import math
from ctypes import *
libad=cdll.LoadLibrary("/home/pi/Documents/rmo.so")
def filter_G(A):
    x=[-5,-4,-3,-2,-1,0,1,2,3,4,5]
    for i in range (len(x)):
        x[i]=math.e**(-x[i]*x[i]/2)
    s=sum(x)
    b=len(A)-1
    b=libad.rm(b)
    temp=0
    filter_A=[]
    for i in range (5,b-5):
        temp=(A[i-5]*x[0]+A[i-4]*x[1]+A[i-3]*x[2]+A[i-2]*x[3]+A[i-1]*x[4]+A[i]*x[5]+A[i+1]*x[6]+A[i+2]*x[7]+A[i+3]*x[8]+A[i+4]*x[9]+A[i+5]*x[10])/s
        filter_A.append(temp)
    return filter_A
